home *** CD-ROM | disk | FTP | other *** search
/ Mission to McDonaldLand / Mission To McDonaldLand.iso / ship.dxr / 00107_Script_UI Rollover Change Member < prev    next >
Text File  |  1998-10-25  |  2KB  |  62 lines

  1. -- Rollover Change Member
  2.  
  3. -- a control
  4.  
  5. -- Display an alternate Image when mouse Pointer is over the sprite.
  6.  
  7. property  standardImage, alternateImage, nextCM
  8.  
  9. on mouseEnter me
  10.   set the member of sprite the spritenum of me = the alternateImage of me
  11. end  
  12.  
  13. on mouseLeave me
  14.   set the member of sprite the spritenum of me = the standardImage of me
  15. end
  16.  
  17. ---
  18.  
  19. on beginSprite me
  20.   set the standardImage of me = the member of sprite the spriteNum of me
  21.   
  22.   if nextCM = 1 then 
  23.     set memref = the member of sprite the currentspritenum
  24.     set castlibnum = the castlibnum of memref
  25.     set memdefault = member (the membernum of member memref + 1) of castlib castlibnum
  26.     set alternateImage = memdefault
  27.   end if
  28.   
  29. end
  30.  
  31. on getPropertyDescriptionList
  32.   
  33.   
  34.   if the currentspritenum = 0 then 
  35.     set memdefault = 0 
  36.   else
  37.     set memref = the member of sprite the currentspritenum
  38.     set castlibnum = the castlibnum of memref
  39.     set memdefault = member (the membernum of member memref + 1) of castlib castlibnum
  40.   end if
  41.   
  42.   
  43.   set p_list = [ ¼
  44.      #nextCM: [ #comment:   "Use Next Member:", ¼
  45.                     #format:   #boolean, ¼
  46.                    #default:    1 ], ¼
  47.   #alternateImage: [ #comment:   "Rollover Cast Member:", ¼
  48.                     #format:   #graphic, ¼
  49.                    #default:    memdefault ] ¼
  50.                  ]
  51.   return p_list
  52. end
  53.  
  54. on getBehaviorDescription
  55.   return ¼
  56. "Change the sprite's cast member when the mouse rolls over the current sprite." & RETURN & ¼
  57. "PARAMETERS:" & RETURN & ¼
  58. "ò Use Next Member - Turn this option on to automatically display the next cast member in the cast when mouse rolls over the sprite."& RETURN & ¼
  59. "ò Rollover Cast Member - Choose a specific cast member to appear when the mouse rolls over the sprite. This setting is ignored if Use Next Member is on."
  60. end
  61.  
  62.